﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Editor.PageControls;

namespace Editor
{
    public partial class ToolBox : Form
    {
        public ToolBox()
        {
            InitializeComponent();
        }

        public PageControl SelectedControl { get; set; }

        private void setSelectedControl(AddFormBase form)
        {
            if (form.ShowDialog() == DialogResult.OK)
                SelectedControl = form.CreatedControl;
        }

        private void utilityButtonLabel_Click(object sender, EventArgs e)
        {
            setSelectedControl(new AddLabelForm());
        }

        private void utilityButtonImageBox_Click(object sender, EventArgs e)
        {
            setSelectedControl(new AddImageBoxForm());
        }

        private void utilityButtonHideButton_Click(object sender, EventArgs e)
        {
            setSelectedControl(new AddHideButtonForm());
        }

        private void ToolBox_FormClosed(object sender, FormClosedEventArgs e)
        {
            EditorForm.ToolBoxChecked = false;
        }
    }
}
